Learn R Programming

RefManageR (version 1.2.0)

[[.BibEntry: Extract entries from a BibEntry object by index

Description

Operator for extracting BibEntry objects by index.

Usage

# S3 method for BibEntry
[[(x, i, drop = FALSE)

Arguments

x

a BibEntry object

i

numeric indices of entries to extract, or a character vector of keys corresponding to the entries to be extracted.

drop

logical, should attributes besides class be dropped from result?

Value

an object of class BibEntry.

See Also

Other operators: $.BibEntry, $<-.BibEntry, +.BibEntry, [.BibEntry, [<-.BibEntry, [[<-.BibEntry, c.BibEntry

Examples

Run this code
# NOT RUN {
file.name <- system.file("Bib", "biblatexExamples.bib", package="RefManageR")
bib <- suppressMessages(ReadBib(file.name))
bib[[20:21]]
bib[c("hyman", "loh")]

## Note this is FALSE because [[ does not inherit from the dropped parent entry while [ does.
identical(bib[1], bib[[1]])
# }

Run the code above in your browser using DataLab